/**
 ----------------------
 1.当前文件用于编辑表单
 2.提供表单相关属性
 3. @param xxxFormConfig.current 指向当前选中的数据
 ----------------------
 */
import type {AxDistrict} from '@/api/modules/ax/district/types';
import type {Rule} from 'ant-design-vue/es/form/interface';
import {useAxForm} from '@/utils/common/hooks';

const districtFormObj: AxDistrict = {
        districtId: "" ,
        pid: "" ,
        district: "" ,
        level: 0 ,
};

// 表格校验
export const districtRules: Record<string, Rule[]> = {
    districtId: [{required: false , trigger: 'change'}],
    pid: [{required: true, trigger: 'change'}],
    district: [{required: true, trigger: 'change'}],
    level: [{required: true, trigger: 'change'}],
};
export const districtFormConfig = useAxForm<AxDistrict>(districtFormObj);
export const districtFormRef = ref()